home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BCI NET
/
BCI NET Dec 94.iso
/
archives
/
programming
/
source
/
fbm12s.lha
/
uunet2fbm.c
< prev
Wrap
C/C++ Source or Header
|
1994-07-18
|
1KB
|
47 lines
/*****************************************************************
* uunet2fbm.c: FBM Release 1.0 25-Feb-90 Michael Mauldin
*
* uunet2fbm.c: convert a bitmap to Targa format
*
* USAGE
* % uunet2fbm [ image ] > image.fbm
*
* HISTORY
* 05-July-89 Dan Sahlin (dan@sics.se) at SICS
* Created from a copy of pic2fbm
*****************************************************************/
# include <stdio.h>
# include <math.h>
# include "fbm.h"
# define USAGE\
"Usage: uunet2fbm [ image ] > image.fbm"
#ifndef lint
static char *fbmid =
"$FBM uunet2fbm.c <1.0> written by Dan Sahlin, source code available \
free from MLM@CS.CMU.EDU and from UUNET archives$";
#endif
main(argc,argv)
int argc; char *argv[];
{ FBM image;
/* Clear pointers */
image.cm = image.bm = (unsigned char *) NULL;
/* Open input if given */
if (argc > 1)
{ if (freopen (argv[1], "r", stdin) != stdin)
{ perror (argv[1]);
exit(1);
}
}
if (read_uunet (&image, stdin, "", 0) &&
write_fbm (&image, stdout))
{ exit(0); }
else
{ exit (1); }
}